import request from '@/utils/request'

export function getGoodsDetail(goodsId) {
	return request({
		url: '/wx/module/goods/detail',
		method: 'get',
		params: {
			goodsId: goodsId
		}
	})
}

export function joinBookShelf(type, goodsId, buyNum) {
	return request({
		url: '/wx/module/join/book/shelf',
		method: 'get',
		params: {
			type: type,
			goodsId: goodsId,
			buyNum: buyNum
		}
	})
}
export function goodsShoppingList() {
	return request({
		url: '/wx/module/shopping/cart/list',
		method: 'get'
	})
}

export function homeGoodsList() {
	return request({
		url: '/wx/module/home/goods/list',
		method: 'get'
	})
}

export function updateShoppingBuyNum(data) {
	return request({
		url: '/wx/module/update/shopping/buy/num',
		method: 'post',
		data: data
	})
}